import request from "../http";
import uploadFile from "../uploadFile";

/**
 * 人才服务首页 help
 */

// 获取企业招聘列表
export function getHelpCaseList(query) {
  return request({
    url: "/companyhelp/requirement/success/list",
    method: "GET",
    params: query
  });
}

// 获取求职诉求列表
export function getHelpAppealList(query) {
  return request({
    url: "/companyhelp/worker/request/list",
    method: "GET",
    params: query
  });
}

// 获取务工人员列表
export function getMigrantWorkerList(query) {
  return request({
    url: "/companyhelp/worker/library/list",
    method: "GET",
    params: query
  });
}

/**
 * 求职诉求简介详情页 helpAppealDetail
 */

// 获取求职诉求简介详情
export function getHelpAppealDetail(id) {
  return request({
    url: "/companyhelp/worker/request/detail/" + id,
    method: "GET"
  });
}

/**
 * 求职诉求列表 helpAppealList
 */

// 获取学历要求下拉列表
export function getEducationSelectList() {
  return request({
    url: "/dttalent/library/educationList",
    method: "GET"
  });
}

/**
 * 帮扶成功案例详情 helpCaseDetail
 */

// 获取企业帮扶案例详情
export function getHelpCaseDetail3(id) {
  return request({
    url: "/companyhelp/requirement/success/detail/" + id,
    method: "GET"
  });
}

/**
 * 帮扶成功案例列表 helpCaseList
 */


/**
 * 高端人才列表 talentRecommendList
 */

// 获取列表
export function getTalentList(query) {
  return request({
    url: "/dttalent/library/list",
    method: "GET",
    params: query
  });
}

// 获取务工人员详情
export function getWorkerDetail(id) {
  return request({
    url: "/companyhelp/worker/library/detail/" + id,
    method: "GET"
  });
}

// 申请简历
export function apply(data) {
  return uploadFile({
    url: "/mine/companyhelp/requirement/worker/library/apply",
    method: "POST",
    data
  });
}

/**
 * 务工人员列表页 helpHumanList
 */


/**
 * DT人才详细资料详情页 helptalentDetail
 */


/**
 * 人才推介列表页 talentRecommendList
 */


/**
 * 视频培训（在线课程）详情页 onlineCourseDetail
 */

// 获取视频培训详情
export function getonlineCourseDetail(id) {
  return request({
    url: "/companytrain/online/detail/" + id,
    method: "GET"
  });
}

// 点击立即参与按钮
export function toSignUp(data) {
  return uploadFile({
    url: "/mine/companytrain/online/join",
    method: "POST",
    data
  });
}

/**
 * 企业培训通知 trainingNotice
 */

// 获取培训通知列表
export function getTrainNoticeList(query) {
  return request({
    url: "/companytrain/notice/list",
    method: "GET",
    params: query
  });
}

// 获取在线课程列表
export function getOnlineCourseList(query) {
  return request({
    url: "/companytrain/online/list",
    method: "GET",
    params: query
  });
}

/**
 * 培训通知详情页 trainNoticeDetail
 */

// 获取培训通知详情
export function getTrainNoticeDetail(id) {
  return request({
    url: "/companytrain/notice/detail/" + id,
    method: "GET"
  });
}
